Skip to content

fix(control_plane): align lease recovery, settlement readback, and runtime fixtures - #9158

Merged
loopx-agent merged 2 commits into
mainfrom
codex/release-2.4.0-control-plane-tail-fixes-20261121
Nov 21, 2026
Merged

loopx-agent merged 2 commits into
mainfrom
codex/release-2.4.0-control-plane-tail-fixes-20261121

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Summary

Pre-release v2.4.0 control-plane stabilization (Lease / Recovery / Authority slice, rebased cleanly onto origin/main 9a377768d9 / #9157):

  1. Task-lease writeback & recovery fences (execution_preparation.py, state_refresh.py, turn_run_once.py)

    • Allow same-generation (lease_epoch pinned, matching idempotency_key, non-regressing version) active lease renewals during guard_first_writeback_execution when allow_same_generation_lease_renewal=True, without relaxing cross-epoch, cross-key, legacy no-epoch, CLI explicit-proof, or version-regression checks.
    • Support resumed --retry-failed-turn recovery against retired .validation-recovery.<version> and .admission-retry[.<turn_id>] leases bound to the exact (todo_id, agent_id, turn_instance_id) todo_complete receipt (reconciled cleanly with #9157's rebound lease handling in turn_run_once.py).
    • Support exact-turn todo_supersede closeout receipts (supersede_event) and todo-bound autonomous_replan_required semantic writebacks (prepared_lease absent) without weakening foreign-owner or mismatched-proof checks.
    • Decomposed guard_first_writeback_execution into focused helpers (_clamp_admitted_lease_version, _recovery_lease_bound, _autonomous_replan_guard_bound, _hard_lease_execution_bound, _todo_superseded_for_turn) to stay within control-plane maintainability budgets.
  2. Settlement readback & goal-frontier rearm preservation (settlement_readback.ts, settlement.py, goal_frontier/__init__.py, quota_result_delivery.py)

    • In settlement_readback.ts, only fail "the original Turn guard has no settlement binding" when both todo_id and replan_obligation_id are null, pass nameOwedPriorTurn (turn_instance_id !== null) for pending_closeout, and expose supersede_event when includeRecords=true.
    • In goal_frontier/__init__.py, preserve rearmed_after_obligation_id via prior_rearm_ack when receipt-bound replan ACK history overrides latest_agent_replan_ack (keeping module lines at 1982 <= 2000).
    • In quota_result_delivery.py, persist host_poll_receipt on QuotaDecisionTransportError failure payloads without prematurely recording a capture_sha256.
  3. Test & fixture alignment across 20 Slice B3 modules + regressions

    • Aligned examples/operation_action_fixtures.py (build_goal_activation), C1 lease proof / guard updates, #9004 single-step settlement plan and loopx_turn_model_context_v0 lookup updates, removed "legacy" provider case (["file", "sqlite"]), and context_capture_page_v1 / context_capture_navigation_v1 paged readback helpers.
    • Added focused Python (tests/control_plane/test_quota_execution_preparation.py) and TypeScript (tests/control_plane_ts/quota_settlement_readback.test.ts) unit tests covering same-generation renewals, .validation-recovery. / .admission-retry matching and rejections, supersede_event, autonomous replan guards, and pending_closeout owed-prior-Turn naming.

Verification

All checks ran locally after the final commit d4d007643f:

  • Python (864 passed, 1 pre-existing skip in test_full_loopx_checkpoint_restore.py, 0 failed) across all 22 assigned Slice B3 modules plus test_quota_execution_preparation.py, test_steward_report_recovery_and_validator.py (#9157), test_autonomous_replan_ack.py, and test_quota_settlement_cli.py:
    • Batch 1: tests/test_native_steward_reports.py (162 passed)
    • Batch 2: tests/test_delegation_lease_lifetime.py, tests/test_independent_delegation_validation.py, tests/control_plane/test_deferred_resume_generated_command.py, tests/control_plane/test_issue_fix_private_evidence_settlement.py, tests/control_plane/test_local_peer_delivery_journey.py, tests/control_plane/test_research_context_adoption.py, tests/control_plane/test_sqlite_authority_cli.py (123 passed)
    • Batch 3: tests/control_plane/test_recovery_due_successor_identity.py, tests/control_plane/test_superseded_turn_settlement_cli.py, tests/control_plane/test_full_loopx_checkpoint_restore.py, tests/control_plane/test_checkpoint_restore_capture.py, tests/control_plane/test_interrupted_turn_continuation.py, tests/control_plane/test_long_chain_projected_closeout.py, tests/control_plane/test_operation_requests.py, tests/control_plane/test_sqlite_archive_and_registry_health.py, tests/control_plane/test_quota_execution_preparation.py, tests/test_steward_report_recovery_and_validator.py (224 passed, 1 skipped)
    • Batch 4: tests/control_plane/test_cli_source_activation_readback.py, tests/control_plane/test_delegation_source_replay.py, tests/control_plane/test_effect_runtime_host_permission.py, tests/control_plane/test_effect_runtime_request_scope.py, tests/control_plane/test_worker_observation_recovery_cli.py, tests/control_plane/test_pr_wait_consumer_adoption.py, tests/control_plane/test_autonomous_replan_ack.py, tests/control_plane/test_quota_settlement_cli.py (355 passed)
  • TypeScript:
    • npm run typecheck:control-plane: passed
    • node --no-warnings --experimental-strip-types --test on quota_settlement_readback.test.ts, steward_reports.test.ts, native_child_admission.test.ts, replan_semantics.test.ts, execution_preparation.test.ts: 264 passed, 0 failed (full npm run test:control-plane also passed 6695 passed, 91 pre-existing skips, 0 failed on identical TS sources at 894bfbaba1)
  • Static & Canary Premerge Gates:
    • ruff check, mypy --follow-imports=silent on typed control-plane owners, scripts/check_rfc_bilingual.py, loopx check (25 files clean): all passed
    • loopx canary premerge --from-git-diff --git-diff-base origin/main --goal-id personal-loopx-maintenance: passed (selected=19 failures=0) including control-plane-maintainability-ratchet-smoke.py (ok: true, unreviewed_count: 0) and valid Goal CQR receipt cqr_1315f4b55cdb5dd5d5c4 (decision: "pass").

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | Gemini | Google | self_reported

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

针对 PR #9158(精确 head d4d007643f85b5a6b76a4ed17e84ced2455c4657,基线 9a377768d95c6de950acdc79aac039820b49ec51)已完成基于 capability 审查契约的独立代码审查与本地隔离验证。生产侧控制面护栏与 C1 回读修复整体严谨且与 #9157 兼容,但发现 1 个 P1 阻塞项:针对 quota_result_delivery.py 错误留证的唯一回归测试因 mock 签名缺少 record_capture 而在真正调用 original_capture 前触发 TypeError,并被宽泛异常兜底吞掉后假性通过。

动机 / Motivation

受影响的调用方包括执行 C1 控制面写回、--retry-failed-turn 恢复或 pending_closeout 结算回读的 LoopX Turn driver(turn_run_once.py)、原生管家报告恢复路径(steward_turn.py)、goal_frontier 状态归约调用方,以及开启 --record-host-poll 后遭遇落盘失败的 quota should-run CLI 调用方。

改动前:当 Turn 执行期间发生同代任务租约续租、--retry-failed-turn 恢复遇到已退役的 .validation-recovery. 或 .admission-retry 租约、待结清读取在显式传入 turn_instance_id 与 todo_id 时遇上未绑定 guard、或收据绑定重规划回溯遇上空的候选 ACK 列表时,写回会被假阴性拒绝、先导欠账 Turn 无法被点名、或 rearmed_after_obligation_id 丢失;而在 quota_result_delivery.py 中 capture 失败时也会丢掉已记录的 host_poll_receipt。改动后:上述写回围栏、pending_closeout 诊断、todo_supersede 读取与 rearm 身份传播均已恢复一致,但测试文件 tests/control_plane/test_worker_observation_recovery_cli.py 中的 failed_publication mock 因缺少 record_capture 参数在调用前抛出 TypeError,导致 quota_result_delivery.py 的 QuotaDecisionTransportError 路径实际未被该测试覆盖。

PR #9158 的 7 个生产模块变更均瞄准具体可复现的控制面恢复与 C1 回读缺口:同代租约续租、精确恢复租约绑定、todo_supersede 结清校验、todo 绑定自主重规划写回、pending_closeout 欠账点名、prior_rearm_ack 继承及 host_poll_receipt 错误载荷留存均在代码层实现;但针对 quota_result_delivery.py 失败留证的回归测试仍因 mock 签名错配而假性通过,尚未真正证明 QuotaDecisionTransportError 分支。

本 PR 不改变 GitHub CI 策略,不放宽跨 epoch、跨 key、旧无 epoch 租约、CLI 显式版本号防回退或他方认领/持有护栏,不引入新的状态词表或协议 schema,也不重做 C1 全量切换或重构既有独立生命周期模块。

为什么现在必须修好该测试缺口:如果仅保留现状合并,未来一旦 capture_decision 或 quota_result_delivery.py 在 write_decision_capture 失败前意外写入 capture_sha256 或破坏 QuotaDecisionTransportError 载荷,test_failed_capture_discloses_the_already_recorded_poll 仍会继续报错 TypeError 却绿灯通过,使该生产修复失去真实回归保护。

改动思路 / Approach

PR #9158 将问题拆解回各自的权威所有者而非在旁路叠加补丁,并在 turn_run_once.py 中与主干刚合入的 #9157(rebound_lease_active)对齐:

子域 基线缺陷 / 冲突 PR #9158 方案(精确 head d4d007643f) 所有权与边界
写回租约护栏 Open Todo 拒绝同代 version 续租;--retry-failed-turn 遇 .validation-recovery. / .admission-retry 退役租约报错;todo_supersede 与 todo 绑定 replan guard 被拒 拆分 5 个辅助谓词,区分同代续租、精确恢复租约、exact-turn supersede 与受护栏约束的 replan 写回 execution_preparation.py + turn_run_once.py + state_refresh.py
结算回读 resolveIdentity 过早返回 receipt_unbound 且 pending_closeout 关闭 nameOwedPriorTurn;未返回 supersede_event 仅当 todoId 与 replanObligationId 均为空时提前失败;按需传递 request.turn_instance_id !== null;透传 supersede_event settlement_readback.ts + settlement.py
重规划后重武装 receipt_bound_replan_ack_candidates 为空时丢失前置 ACK 的 rearmed_after_obligation_id 从最近 ACK 提取仅用于继承 rearmed_after_obligation_id 的 prior_rearm_ack,绝不设为 acknowledged=True goal_frontier/__init__.py(1982 行)
失败传输留证 emit_quota_result 在 capture_decision 失败前尚未记录已附加 host_poll_receipt 的决策对象 调用 record_capture(payload, None) 暂存决策且保持 capture_sha256=None quota_result_delivery.py(测试 mock 需补修)

控制面正确性不变量保留在既有的单一权威边界内:租约与写回护栏集中于 execution_preparation.py 并通过小型具名谓词解耦复杂度;结算绑定与 pending_closeout 语义仍由 TypeScript settlement_readback.ts 统一裁决;goal_frontier/init.py 以纯衍生参数 prior_rearm_ack 补齐身份而不新增状态源;CLI 层 quota_result_delivery.py 与 turn_run_once.py 仅做参数传递与传输错误载荷保留。

当前 PR 边界限定在 release v2.4.0 控制面尾部修复与 17 个 C1/readback/navigation 测试夹具对齐;后续仅需修复 test_worker_observation_recovery_cli.py 的 failed_publication 签名与断言即可完成验证闭环,无需扩大生产改造或重构 steward_turn.py 的后缀构造。

具体改动 / Changes

规格依据与验收条目映射

依据主干既有规格 docs/architecture/rfcs/controller-executor-unified-contract-v0/contract-and-context.md(commit 3495df117229483b5104f0a68cb93034bc676de2)以及 docs/quota-allocation.md 对 pending_closeout、C1 租约证明及失败留证的要求逐条核验:

  • C1-LEASE-RECOVERY(implemented):hard_lease 写回与恢复保留跨 epoch / 跨 key / 无 epoch / 版本回退 / 他方认领拒绝护栏,同时允许显式启用的同代续租、--retry-failed-turn 恢复退役租约、todo_supersede 结清与受限自主重规划写回(实现:loopx/control_plane/quota/execution_preparation.py::_hard_lease_execution_bound,验证:tests/control_plane/test_quota_execution_preparation.py 与 tests/test_steward_report_recovery_and_validator.py)。
  • C1-SETTLEMENT-READBACK(implemented):pending_closeout 在同一不变快照下维持对先导未结清 Turn 的命名诊断,并在 includeRecords=true 时暴露 supersede_event(实现:loopx/control_plane/quota/settlement_readback.ts::resolveIdentity,验证:tests/control_plane_ts/quota_settlement_readback.test.ts 与 tests/control_plane/test_superseded_turn_settlement_cli.py)。
  • C1-REARM-IDENTITY(implemented):在收据绑定回溯场景下保持 rearmed_after_obligation_id 一致性且不越权确认(实现:loopx/control_plane/goals/goal_frontier/__init__.py::build_goal_frontier_projection_context_from_status,验证:tests/control_plane/test_quota_settlement_cli.py 与 tests/control_plane/test_long_chain_projected_closeout.py)。
  • C1-CAPTURE-FAILURE-RECEIPT(not_met):虽然 quota_result_delivery.py 本身可在真实 QuotaDecisionTransportError 时保留 host_poll_receipt 且不伪造 capture_sha256,但本 PR 修改后的唯一回归测试 tests/control_plane/test_worker_observation_recovery_cli.py::test_failed_capture_discloses_the_already_recorded_poll 因 failed_publication 未接收 record_capture 而在调用前直接抛出 TypeError,被外层异常兜底包装后假性通过,未实际证明 QuotaDecisionTransportError 与 os.replace 失败分支(最小修复:为 failed_publication 增加 record_capture=None 并透传给 original_capture,同时补充 "error_class" not in failed 与 "Decision capture failed" in failed["reason"] 断言)。

关键代码讲解

  1. _hard_lease_execution_bound 与 _recovery_lease_bound(loopx/control_plane/quota/execution_preparation.py)
    将原先内联在 guard_first_writeback_execution 中的分支拆为职责单一的 5 个辅助函数。_clamp_admitted_lease_version 仅在 prepared_lease_epoch 与 prepared_lease_version 均为纯 int(排除 bool)且观测版本更高时向下钳位,确保无 epoch 旧收据不能升级版本,跨 epoch(如 epoch 1 vs 2)或跨 idempotency_key 仍严格失败。_recovery_lease_bound 只在 not todo_open 且存在 validation_recovery_turn_instance_id 时激活,要求:(a)settlement.completion_event 为匹配 (todo_id, agent_id, validation_recovery_turn_instance_id) 的 todo_complete;(b)权威存储中唯一已退役且归属当前 agent_id 的 current_proof(来自 TS projectExecutionPreparation)键名精确为 {base}.admission-retry 或以 {base}.validation-recovery. / {base}.admission-retry. 开头;(c)requested_proof 的哈希、版本经钳位后与 prepared_lease 完全相等。_autonomous_replan_guard_bound 仅在 not prepared_required and prepared_lease is None 时可到达,要求 semantic_replan_guard.scope == "turn_guard"、非空 selected_obligation_id、heartbeat_receipt.status == "autonomous_replan_required"、delivery_allowed is not True、current.state in {"ready", "claim_required"}(若他方认领或持有租约则 TS 投影为 blocked_by_conflict,直接拒绝)以及空 proof 或精确匹配的 requested_proof。

  2. execute_turn_run_once(loopx/cli_commands/turn_run_once.py)
    针对 #9157 合并冲突做了正确协调:当 --retry-failed-turn 且非 dry_run 且 completion_turn_key == settlement_identity.turn_instance_id 时记录 recovery_turn_instance_id;当且仅当 completion_todo_id is not None and (recovery_turn_instance_id is None or rebound_lease_active) 时才把 refresh_task_lease_proof 置为 None。这样 #9157 的冻结报告重绑定路径(rebound_lease_active=True)保持原有行为,而未重绑定的 --retry-failed-turn 路径仍向 refresh_state_run 与 guard_first_writeback_execution 传入原始 task_lease_proof 与 validation_recovery_turn_instance_id;同时普通 CLI refresh-state 默认保持 allow_same_generation_lease_renewal=False。

  3. resolveIdentity 与 readPendingCloseoutFromRequest(loopx/control_plane/quota/settlement_readback.ts)
    在 resolve_original_binding=true 时,若原 Turn guard 无绑定(!originalTodoId && !originalReplanId && !requestSubject),改为仅当请求本身也未给出 todoId 或 replanObligationId 时返回 "the original Turn guard has no settlement binding";否则允许流程继续进入 1137–1196 行的未绑定诊断分支,并通过 readPendingCloseoutFromRequest 传入 request.turn_instance_id !== null 启用单层 owedPriorTurn 查询(owedPriorTurnFromSnapshot 内部仍传 false,避免递归)。同时在 includeRecords 为真时透传 supersede_event(由 findStepEvent 按 goal_id/agent_id/run_id/settlement_effect_id 精确匹配)。

  4. build_goal_frontier_projection_context_from_status(loopx/control_plane/goals/goal_frontier/__init__.py)
    当 receipt_bound_replan_obligation_id 存在且受限候选列表导致 latest_agent_replan_ack 为 None 时,回溯最近一条不等于当前 receipt_bound_replan_obligation_id 的 ACK 作为 prior_rearm_ack。在 LONG_TODO_CHAIN 分支仅当原决策与 prior_decision 均未确认(not acknowledged)且存在 rearmed_after_obligation_id 时继承该字段;在 VISION_ACCEPTANCE_GAP 分支仅用于填充 rearmed_after_obligation_id,绝不向 _vision_gap_acknowledged 或 _succession_gap_acknowledged 泄露确认状态。模块总行数控制为 1982 行(<= 2000)。

  5. _publish_quota_result 与 failed_publication(loopx/cli_commands/quota_result_delivery.py & tests/control_plane/test_worker_observation_recovery_cli.py)
    生产代码在 attach_host_poll_receipt 之后立即执行 record_capture(payload, None) 更新 saved_decision 而不写入 capture_sha256。但在 test_failed_capture_discloses_the_already_recorded_poll 中,测试将 quota_result_delivery.capture_decision 替换为 failed_publication(directory, payload, *, args, native_context) 却遗漏了 record_capture 形参,导致真正调用第 367 行时直接触发 TypeError 而非预期的 QuotaDecisionTransportError。

除上述 P1 问题外,其余 16 个测试及示例夹具文件的修改(build_goal_activation、lease_proof 显式证明、compose_turn_decision/task_context、context_capture_page_v1/context_capture_navigation_v1 分页读取、移除已退役 "legacy" provider 参数化及 --settle-turn --settlement-receipt 剥离)均与 C1 实际契约保持语义一致,未发现弱化断言或私域信息泄露。

对主干的风险 / Risks

[P1 阻塞项] test_failed_capture_discloses_the_already_recorded_poll 因 mock 签名缺少 record_capture 而触发 TypeError 假性通过

  • Severity: P1(blocking)
  • Trigger: 执行 tests/control_plane/test_worker_observation_recovery_cli.py::test_failed_capture_discloses_the_already_recorded_poll(loopx quota should-run --record-host-poll --decision-output-dir ...)。
  • Code path: tests/control_plane/test_worker_observation_recovery_cli.py#L220-L237 -> loopx/cli_commands/quota_result_delivery.py#L367-L373 -> loopx/cli_commands/quota_result_delivery.py#L198-L214。
  • Observed outcome: 独立在精确 head d4d007643f85b5a6b76a4ed17e84ced2455c4657 探针实测显示,由于 failed_publication(directory, payload, *, args, native_context) 不接受 record_capture=record_capture,调用瞬间抛出 TypeError,original_capture 与 os.replace 故障注入从未执行(called original_capture? False);emit_quota_result 的 except Exception 将 TypeError 包装成 decision_transport_failed 并输出 "error_class": "TypeError" 与通用文案 "The guard committed, but its result could not be presented.",因测试未校验 error_class 或 reason 而假性绿灯。同时这也令 quota_result_delivery.py 的 QuotaDecisionTransportError 路径缺少有效回归保护。
  • Minimum repair: 在 tests/control_plane/test_worker_observation_recovery_cli.py#L220-L237 为 failed_publication 增加 record_capture=None 并透传给 original_capture(..., record_capture=record_capture),同时补充 assert "error_class" not in failed 与 assert failed["reason"].startswith("Decision capture failed after guard evaluation")(已在隔离复现中验证修改后可正常触发 QuotaDecisionTransportError、error_class=None 并保留 host_poll_receipt)。
  • Rerun command: uv run --extra test python -m pytest -q tests/control_plane/test_worker_observation_recovery_cli.py -k test_failed_capture_discloses_the_already_recorded_poll

对照分析与验证汇总

  • 安全边界与权威反事实:execution_preparation.py 对外方租约/认领、跨 epoch、跨 key、无 epoch 旧收据、版本号倒退及无效恢复后缀(如 turn-1.admission-retry2)均保持 fail-closed;_autonomous_replan_guard_bound 在 prepared_required=True 或存在 prepared_lease 或 claimed_by_other 时不可达;settlement_readback.ts 在无 todo_id/replan_obligation_id 时仍返回原 receipt_unbound 错误;#9157 冻结报告恢复与 rebound_lease_active 验证全部通过。
  • 本地验证实测(head d4d007643f85b5a6b76a4ed17e84ced2455c4657):
    • TypeScript:npm run typecheck:control-plane PASS;node --test --experimental-strip-types 覆盖 quota_settlement_readback.test.ts、steward_reports.test.ts、execution_preparation.test.ts、native_child_admission.test.ts、replan_semantics.test.ts 共 264 passed, 0 failed;frontier_revision.test.ts 20 passed, 0 failed。并针对 9a377768d9 基线运行 quota_settlement_readback.test.ts 新增 2 用例及 test_quota_execution_preparation.py 新增 5 用例,独立复现基线全败、本 head 全过。
    • Python:9 组核心调度与恢复套(Batch A:quota_execution_preparation / steward_report_recovery / native_steward_reports / delegation_lease_lifetime / independent_delegation_validation / recovery_due_successor_identity / worker_observation_recovery_cli / pr_wait_consumer_adoption / local_peer_delivery_journey)386 passed;13 组 C1/checkpoint/SQLite/replan 套(Batch B)410 passed, 1 skipped(唯一跳过项为 test_full_loopx_checkpoint_restore.py::test_full_restore_preserves_canonical_work_and_requires_exact_binding_cas[retained_point2],因未设置 LOOPX_NATIVE_CHECKPOINT_BIN);replan/closeout/superseded/interrupted 75 passed;decision_capture 228 passed;turn_completion/recovery/complete_turn 132 passed;chat_operation_actions 43 passed;operation_original_turn/wake_preflight 24 passed;test_maintainability_ratchet.py 14 passed(合计 1312 passed, 1 skipped;注:test_worker_observation_recovery_cli.py::test_failed_capture_discloses_the_already_recorded_poll 的 2 个参数化用例包含在上述通过数中,但实证仅因 TypeError 兜底假性通过)。
    • 静态与门禁:ruff check PASS;mypy --follow-imports=silent(20 文件)PASS;scripts/check_rfc_bilingual.py PASS;examples/control_plane/control-plane-maintainability-ratchet-smoke.py(ok: true, unreviewed_count: 0, goal_frontier/__init__.py 1982 行)与 tests/canary/test_maintainability_ratchet.py(14 passed)PASS;loopx check(25 个变更文件)PASS(ok: true, hit_count: 0);loopx canary premerge --from-git-diff --git-diff-base origin/main 运行结果:direct_checks 4/4、 python_compile 1/1、risk_profile_run 8/8、boundary_run 1/1 全部 PASS,catalog_run 9/10 通过(无 node_modules 符号链接时 examples/semantic-vocabulary-drift-smoke.py 因缺少 typescript 依赖报错;挂载 TS 依赖复测该脚本返回 semantic-vocabulary-drift-smoke: ok exit=0);作者 CQR 收据 cqr_1315f4b55cdb5dd5d5c4 只读核验 status=valid, receipt_valid=true(25 个文件一致)。
    • 非阻塞观察:execution_preparation.py#L335 对 requested_proof["expected_version"] 使用 isinstance(..., int) 而未排除 bool(可作轻量一致化 follow-up);.validation-recovery. / .admission-retry 键格式在 steward_turn.py 与 execution_preparation.py 仍有共享辅助函数的整理空间,均不构成阻塞。

我的整体评价 / Verdict

  • 长程与用户体验影响:在 long_horizon 维度,租约同代续租、恢复绑定、todo_supersede 结清、pending_closeout 诊断与 rearmed_after_obligation_id 继承均保持(preserved)既有长程推进与幂等恢复语义;在 user_experience 维度,因 quota_result_delivery.py 的 QuotaDecisionTransportError host_poll_receipt 保留路径在测试中被 TypeError mock 掩盖,属于未充分证明(not_yet_proven)。visual_review 为 not_applicable:本次改动仅涉及 loopx/control_plane/、loopx/cli_commands/、loopx/state_refresh.py、examples/ 与 tests/ 中的控制面逻辑与 CLI/测试夹具,未修改任何前端页面、桌面端视图或渲染组件(checked all 25 changed paths)。;未验证范围:none(纯控制面与 CLI 改动,无前端渲染范围)。
  • 代码体量与相称性:生产净变更集中且结构克制,拆分 guard_first_writeback_execution 显著降低了单函数圈复杂度且守住 goal_frontier/__init__.py <= 2000 行红线;code_volume 结论为 necessary(兼容边界评估 retain,保留无 epoch 旧收据精确版本语义),change_proportionality 结论为 proportionate,architecture_assessment 决定为 retain(边界见上文“改动思路”)。
  • 语义词表与发布边界:本 PR 未新增或修改任何 Enum / Literal / as const 封闭词表,全部复用既有状态与收据字段(reuse_existing);diff 扫描未发现本地绝对路径、凭证或私域信息。待修复 test_worker_observation_recovery_cli.py 中 failed_publication 的 record_capture 参数透传与 QuotaDecisionTransportError 断言后,即可重新提交复审并进入合并流程。

English verdict: REQUEST_CHANGES on 9158@d4d007643f85b5a6b76a4ed17e84ced2455c4657 — Fix the broken failed_publication mock signature (record_capture=None) and assert real QuotaDecisionTransportError delivery without error_class in tests/control_plane/test_worker_observation_recovery_cli.py; all production fixes and other verified suites passed local validation.

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | Gemini | Google | self_reported

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

针对 PR #9158 的 Round 2 精确 head 0bf00a7da6506454abdcb1016d91b101690fbaac(基于 Round 1 d4d007643f85b5a6b76a4ed17e84ced2455c4657 追加修复;PR base 9a377768d95c6de950acdc79aac039820b49ec51,远端 origin/main 已推进至 ddba6bf3964baa59e0d86979119aa027422d2aa5 且与本 PR 25 个文件零重叠)已完成独立代码审计与隔离验证。Round 1 指出的 P1(failed_publication mock 缺少 record_capture 透传导致 TypeError 假性通过)与 P3(expected_version 未排除 bool)已全部修复并通过实测,当前无阻塞问题。

动机 / Motivation

受影响的调用方包括执行 C1 控制面写回、--retry-failed-turn 恢复或 pending_closeout 结算回读的 LoopX Turn driver(turn_run_once.py)、原生管家报告恢复路径(steward_turn.py)、goal_frontier 状态归约调用方,以及开启 --record-host-poll 后遭遇落盘失败的 quota should-run CLI 调用方。

改动前:当 Turn 执行期间发生同代任务租约续租、--retry-failed-turn 恢复遇到已退役的 .validation-recovery. 或 .admission-retry 租约、待结清读取在显式传入 turn_instance_id 与 todo_id 时遇上未绑定 guard、收据绑定重规划回溯遇上空的候选 ACK 列表、或 quota_result_delivery.py 中 capture 失败时,写回会被假阴性拒绝、先导欠账 Turn 无法点名、rearmed_after_obligation_id 丢失,或已记录的 host_poll_receipt 被丢弃;且 Round 1(commit d4d0076)中 test_failed_capture_discloses_the_already_recorded_poll 的 mock 漏接 record_capture 导致 TypeError 假性通过。改动后(commit 0bf00a7):上述生产护栏与回读逻辑全部到位,Round 1 的 P1 测试 mock 已补齐 record_capture=None 透传、replace_calls == 1 与无 error_class 的真实 QuotaDecisionTransportError 断言,Round 1 的 P3 bool 防护也已补充。

Round 2 在精确 head 0bf00a7 上验证:同代租约续租(显式 bool 排除)、精确恢复租约绑定、todo_supersede 结清校验、todo 绑定自主重规划写回、pending_closeout 欠账点名、prior_rearm_ack 继承以及 capture 失败时保留 host_poll_receipt 且不设 capture_sha256 均已由独立 TypeScript、Python 回归测试与静态门禁实测通过。

本 PR 不改变 GitHub CI 策略,不放宽跨 epoch、跨 key、旧无 epoch 租约、CLI 显式版本号防回退或他方认领/持有护栏,不引入新的状态词表或协议 schema,也不覆盖并行独立分支(如 Slice B4/B5)或重做 C1 全量切换。

本 PR(Slice B3)聚焦 release v2.4.0 控制面尾部修复与 17 个 C1/readback/navigation 测试夹具对齐;其余独立并行收尾分支与全仓非变更面全量回归由对应分支与发布候选统一验收,主干基线推进至 ddba6bf 与本 PR 的 25 个变更文件零重叠。

改动思路 / Approach

PR #9158 将各子域缺陷收口至既有权威所有者,并在 turn_run_once.py 中保持与 #9157(rebound_lease_active)兼容;Round 2 针对 Round 1 反馈做了最小精准闭环:

子域 基线 / Round 1 缺口 PR #9158 Round 2 方案(精确 head 0bf00a7da6) 所有权与边界
写回租约护栏 Open 同代续租/恢复后缀/todo_supersede/replan guard 假拒;R1 expected_version 未排除 bool 拆分为 5 个谓词并在 execution_preparation.py#L334-L337 显式排除 bool execution_preparation.py + turn_run_once.py + state_refresh.py
结算回读 resolveIdentity 过早失败且 pending_closeout 未启用 nameOwedPriorTurn;缺 supersede_event 显式传入 todoId/replanObligationId 进入诊断;按 turn_instance_id !== null 启用单层查询并暴露 supersede_event settlement_readback.ts + settlement.py
重规划后重武装 候选 ACK 列表为空时丢失 rearmed_after_obligation_id 从最近非当前 obligation ACK 提取 prior_rearm_ack 且绝不传播 acknowledged=True goal_frontier/__init__.py(1982 行)
失败传输留证 R1 failed_publication 漏收 record_capture 触发 TypeError 掩盖 QuotaDecisionTransportError record_capture(payload, None) 暂存 host_poll_receipt;测试透传 record_capture 并断言 replace_calls == 1 且无 error_class quota_result_delivery.py + test_worker_observation_recovery_cli.py

控制面正确性不变量保留在既有的单一权威边界内:租约与写回护栏集中于 execution_preparation.py 并通过小型具名谓词解耦复杂度;结算绑定与 pending_closeout 语义仍由 TypeScript settlement_readback.ts 统一裁决;goal_frontier/init.py 以纯衍生参数 prior_rearm_ack 补齐身份而不新增状态源;CLI 层 quota_result_delivery.py 与 turn_run_once.py 仅做参数传递与传输错误载荷保留。

当前 PR 边界限定在 release v2.4.0 控制面尾部修复与 17 个 C1/readback/navigation 测试夹具对齐,Round 2 仅追加 test_worker_observation_recovery_cli.py mock 修复与 execution_preparation.py expected_version bool 排除,未越界修改无关模块或扩大生产重构。

具体改动 / Changes

规格依据与验收条目映射

依据主干既有规格 docs/architecture/rfcs/controller-executor-unified-contract-v0/contract-and-context.md(commit 3495df117229483b5104f0a68cb93034bc676de2)以及 docs/quota-allocation.md 对 pending_closeout、C1 租约证明及失败留证的要求逐条核验:

  • C1-LEASE-RECOVERY(implemented):hard_lease 写回与恢复保留跨 epoch / 跨 key / 无 epoch / 版本回退 / 他方认领与布尔版本拒绝护栏,同时允许显式启用的同代续租、--retry-failed-turn 恢复退役租约、todo_supersede 结清与受限自主重规划写回(实现:loopx/control_plane/quota/execution_preparation.py::_hard_lease_execution_bound,验证:tests/control_plane/test_quota_execution_preparation.py 与 tests/test_steward_report_recovery_and_validator.py)。
  • C1-SETTLEMENT-READBACK(implemented):pending_closeout 在同一不变快照下维持对先导未结清 Turn 的命名诊断,并在 includeRecords=true 时暴露 supersede_event(实现:loopx/control_plane/quota/settlement_readback.ts::resolveIdentity,验证:tests/control_plane_ts/quota_settlement_readback.test.ts 与 tests/control_plane/test_superseded_turn_settlement_cli.py)。
  • C1-REARM-IDENTITY(implemented):在收据绑定回溯场景下保持 rearmed_after_obligation_id 一致性且不越权确认(实现:loopx/control_plane/goals/goal_frontier/__init__.py::build_goal_frontier_projection_context_from_status,验证:tests/control_plane/test_quota_settlement_cli.py 与 tests/control_plane/test_long_chain_projected_closeout.py)。
  • C1-CAPTURE-FAILURE-RECEIPT(implemented):quota_result_delivery.py 在真实 QuotaDecisionTransportError 时保留 host_poll_receipt 且不伪造 capture_sha256;Round 2 在 tests/control_plane/test_worker_observation_recovery_cli.py#L220-L246 中为 failed_publication 透传 record_capture=None,通过 replace_calls == 1、"error_class" not in failed 与 "Decision capture failed" in failed["reason"] 在 File 与 SQLite 双后端实测闭环。

Round 2 增量变更审计(d4d007643f..0bf00a7da6)

  1. failed_publication 真实故障注入闭环(tests/control_plane/test_worker_observation_recovery_cli.py#L220-L253)
    新增 replace_calls = 0 计数器与 record_capture=None 形参,将 record_capture=record_capture 透传给 original_capture 并在 finally 累计 mocked_replace.call_count;随后断言 replace_calls == 1、code == 1、failed["status"] == "decision_transport_failed"、"error_class" not in failed、"Decision capture failed" in failed["reason"] 以及 "captured_decision" not in failed 且保留完整 host_poll_receipt。
  2. expected_version 布尔类型防护(loopx/control_plane/quota/execution_preparation.py#L332-L339)
    在同代续租分支对 current_proof.get("expected_version") 与 requested_proof.get("expected_version") 均追加 and not isinstance(..., bool),消除 Python isinstance(True, int) is True 的隐式隐患,与其他版本/epoch 类型判断保持一致。
  3. 主干基线对齐复核(9a377768d9..ddba6bf396)
    经 comm -12 比对,远端 origin/main 推进期间修改的文件集合与本 PR 修改的 25 个文件无任何交集;作者本地 Goal CQR 收据 cqr_a07db66b42e564ec382b(范围指纹 a07db66b42e564ec382b71bd3633e138809fc5465d121118d8bf9cc84e4bb93c,25 文件)只读核验为 status: valid, receipt_valid: true。

对主干的风险 / Risks

  • 安全边界与主干兼容性:execution_preparation.py 对外方租约/认领、跨 epoch、跨 key、无 epoch 旧收据、布尔/倒退版本及无效恢复后缀均保持 fail-closed;_autonomous_replan_guard_bound 在 prepared_required=True、prepared_lease 存在或 claimed_by_other 时不可达;#9157 冻结报告恢复与 rebound_lease_active 逻辑完好。
  • Round 2 本地隔离实测(head 0bf00a7da6506454abdcb1016d91b101690fbaac):
    • TypeScript:npm run typecheck:control-plane PASS;node --no-warnings --test --experimental-strip-types 覆盖 quota_settlement_readback.test.ts、steward_reports.test.ts、execution_preparation.test.ts、native_child_admission.test.ts、replan_semantics.test.ts 与 frontier_revision.test.ts 共 284 passed, 0 failed。
    • Python:Round 2 针对受影响核心套(test_worker_observation_recovery_cli.py、test_quota_execution_preparation.py、test_native_steward_reports.py、test_steward_report_recovery_and_validator.py)全量实测 289 passed, 0 failed(0 skipped);其中 test_failed_capture_discloses_the_already_recorded_poll(file/sqlite 双后端)真实穿过 original_capture 与 os.replace 故障注入(replace_calls == 1、无 error_class、含 Decision capture failed 原因且保留 host_poll_receipt)。另结合 Round 1 审计对未改动测试面(Batch A/B 其余套、decision_capture、turn_completion、chat_operation、ratchet)的基线覆盖(该 2 处以外 23 个文件及核心逻辑在 Round 2 均未变更),全系列相关回归均已完成核验。
    • 静态与门禁:ruff check(23 个变更 .py 文件)PASS;mypy --follow-imports=silent(配置 20 个源文件)Success: no issues found in 20 source files;scripts/check_rfc_bilingual.py PASS;examples/control_plane/control-plane-maintainability-ratchet-smoke.py --format=json PASS(ok: true, unreviewed_count: 0, goal_frontier/__init__.py 1982 行 <= 2000);examples/semantic-vocabulary-drift-smoke.py(挂载 TS node_modules)PASS(semantic-vocabulary-drift-smoke: ok exit 0);loopx check(25 个变更文件)PASS(ok: true, public boundary scan clean: 25 files);loopx canary premerge --from-git-diff --git-diff-base origin/main(无 node_modules 符号链接隔离工作树):direct_checks 6/6、risk_profile_run 8/8、boundary_run 1/1 全部 PASS,catalog_run 9/10 通过(唯一失败项为无 node_modules 时 semantic-vocabulary-drift-smoke.py 报 NPM_DEV_DEPENDENCIES_MISSING,已挂载依赖独立复测通过;隔离工作树 change_quality 为 null);作者 Goal CQR 收据 cqr_a07db66b42e564ec382b 只读核验 status=valid, receipt_valid=true(25 个文件一致)。
  • 残余风险(Non-blocking):
    1. 与本 PR 无交集的仓库全量其余测试套件留待对应收尾分支与发布候选统一验证。
    2. .validation-recovery. / .admission-retry 键格式在 steward_turn.py 与 execution_preparation.py 后续可提取共享辅助函数(非本次阻塞)。

我的整体评价 / Verdict

  • 长程与用户体验影响:在 long_horizon 维度,租约同代续租(含 bool 排除)、恢复绑定、todo_supersede 结清、pending_closeout 诊断与 rearmed_after_obligation_id 继承均保持(preserved)既有长程推进与幂等恢复语义;在 user_experience 维度,quota_result_delivery.py 的 QuotaDecisionTransportError host_poll_receipt 保留路径已在 File 与 SQLite 双后端通过真实 os.replace 故障注入与无 error_class 断言验证(preserved)。visual_review 为 not_applicable:本次改动仅涉及 loopx/control_plane/、loopx/cli_commands/、loopx/state_refresh.py、examples/ 与 tests/ 中的控制面逻辑与 CLI/测试夹具,未修改任何前端页面、桌面端视图或渲染组件(checked all 25 changed paths)。 未验证范围:none(纯控制面与 CLI 改动,无前端渲染范围)。
  • 代码体量与相称性:Round 2 仅改动 2 个文件共 +14/-4 行,精准消除 P1/P3 缺口;全 PR 25 个文件净变更克制,拆分 guard_first_writeback_execution 降低圈复杂度并保持 goal_frontier/__init__.py 为 1982 <= 2000 行;code_volume 为 necessary(兼容边界评估 retain),change_proportionality 为 proportionate,architecture_assessment 为 retain(边界见上文“改动思路”)。
  • 语义词表与发布边界:本 PR 未新增或修改任何 Enum / Literal / as const 封闭词表(reuse_existing);全 diff 与远端回读均无本地绝对路径、凭证或私域信息泄露,满足精确 head 批准条件(wait_for_ci: false)。

English verdict: APPROVE on 9158@0bf00a7da6506454abdcb1016d91b101690fbaac — Round 2 resolved the Round 1 P1 mock signature gap (record_capture forwarding and replace_calls == 1 / QuotaDecisionTransportError assertions without error_class) and P3 bool guard; TypeScript checks, targeted Python suites, static checks, and public-boundary gates all passed cleanly.

@loopx-agent
loopx-agent merged commit 982b539 into main Nov 21, 2026
39 of 50 checks passed
@loopx-agent
loopx-agent deleted the codex/release-2.4.0-control-plane-tail-fixes-20261121 branch November 21, 2026 01:22
loopx-agent added a commit that referenced this pull request Nov 21, 2026
loopx-agent added a commit that referenced this pull request Nov 21, 2026
…wording (#9162)

* docs(release): reconcile final v2.4.0 stabilization PRs and boundary wording

Signed-off-by: LoopX Agent <[email protected]>

* docs(release): align #9158 and #9161 descriptions with verified commits

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>
loopx-agent added a commit that referenced this pull request Nov 21, 2026
* fix(cli): preserve typed runtime diagnostics in Turn failures

Signed-off-by: LoopX Agent <[email protected]>

* feat(steward): support per-endpoint model preferences and Codex-to-Antigravity failover (#9141)

Signed-off-by: LoopX Agent <[email protected]>

* Keep the prepared Chat adapter available to a retry (#9134)

A failed worker start can finish cleanup after a same-turn retry has
selected the adapter. Keep its lifetime tied to the Session and let
failed dispatch release its own worker registration. The regression
asserts one upstream turn and explicit adapter closure with the Session.

Port the fix from 4453e4bdd77486ec14b952f88ca893310b32e26c.

(cherry picked from commit 173e42b4f051b885c3a3389e1cad9c5722f7b7dd)

Signed-off-by: LoopX Agent <[email protected]>

* fix(steward): recover zero-effect monitors and cleared-replan reports (#9143)

Signed-off-by: LoopX Agent <[email protected]>

* fix(steward): admit flexible_primary_available executor transitions in conversation_scope (#9145)

Signed-off-by: LoopX Agent <[email protected]>

* Verify quota gate scope through signed lane references (#9101)

* test(quota): verify scoped gates through complete lane references

Signed-off-by: LoopX Agent <[email protected]>

* Test canonical quota gates in both public response modes

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* Test C1 planning and Host input from the original quota capture (#9102)

* Use recorded quota decisions in the no-Todo settlement regression

Signed-off-by: LoopX Agent <[email protected]>

* Exercise the complete Host prompt from the captured quota source

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* Prepare the CLI budget baseline with a private Git index (#9103)

Signed-off-by: LoopX Agent <[email protected]>

* Exercise C1 Goal delivery and bound replan from the saved source (#9104)

Signed-off-by: LoopX Agent <[email protected]>

* Keep long claim overlap scopes on demand (#9086)

* Link long thin-claim overlap lists to their receipts

Signed-off-by: LoopX Agent <[email protected]>

* Read claim overlap details without copying the lease

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* fix(quota): preserve explicit Monitor Todo selection (#9099)

Carry Todo selection provenance into quota admission. Preserve explicit secondary Monitor polling and recovery from previously admitted receipts.

Signed-off-by: LoopX Agent <[email protected]>

* Keep ready Todo scope details on the required context read (#9106)

Signed-off-by: LoopX Agent <[email protected]>

* Fix archive rollback with custom install directories (#9066)

* refactor(core): defer benchmark implementations during capability discovery

Preserve the benchmark toolkit public exports and static types while keeping execution and experiment implementations out of metadata discovery. Qualify source and installed Core paths, and reconcile the paired minimal/Standard RFC boundary without changing activation or authority defaults.

Signed-off-by: cicolord <[email protected]>

* Defer Yardstick evaluation until an enabled Explore read

Signed-off-by: cicolord <[email protected]>

* Omit empty Todo summary lanes from ordinary Worker context

Signed-off-by: cicolord <[email protected]>

* fix(update): honor configured archive directories during rollback

Signed-off-by: LoopX Agent <[email protected]>

* fix(lark): replay recall guard on current main

Signed-off-by: huangruiteng <[email protected]>

* docs: record the verified LoopX 2.3.0 release baseline

Signed-off-by: LoopX Agent <[email protected]>

* Preserve quota spend source when prepared work is admitted

Signed-off-by: LoopX Agent <[email protected]>

* test(quota): qualify native saved complete-Turn checkpoints

Signed-off-by: LoopX Agent <[email protected]>

* Retry cleanup of an owned file mutation marker

Signed-off-by: LoopX Agent <[email protected]>

* Keep synthetic Git-path test data outside the public source scan

Signed-off-by: LoopX Agent <[email protected]>

* fix(quota): share native preparation wait with readiness

Signed-off-by: LoopX Agent <[email protected]>

* fix(doctor): bind package update readback to its Python environment

Signed-off-by: LoopX Agent <[email protected]>

* Keep Doctor discovery separate from service activation

Signed-off-by: LoopX Agent <[email protected]>

* Verify the recorded Python launcher before Doctor probes it

Signed-off-by: LoopX Agent <[email protected]>

* fix(desktop): require runtime qualification for macOS preview updates

Signed-off-by: LoopX Agent <[email protected]>

* fix(quota): reuse replan projection owners during recovery

Signed-off-by: LoopX Agent <[email protected]>

* Qualify Codex 0.169 native context replay on main

Signed-off-by: LoopX Agent <[email protected]>

* Stop regenerating retired quota view aliases

Signed-off-by: LoopX Agent <[email protected]>

* fix: pin deferred native context reads to the original capture

Signed-off-by: LoopX Agent <[email protected]>

* Keep native capture navigation within small output budgets

Signed-off-by: LoopX Agent <[email protected]>

* Retire legacy heartbeat work prompt generation

Signed-off-by: LoopX Agent <[email protected]>

* Capture C1 composition failures as receipt diagnostics

Signed-off-by: LoopX Agent <[email protected]>

* Recover interrupted native Todo readiness from the original Turn

Signed-off-by: LoopX Agent <[email protected]>

* Revalidate the original lease before publishing resumed native context

Signed-off-by: LoopX Agent <[email protected]>

* Fence native readiness publication with the canonical lease writer

Signed-off-by: LoopX Agent <[email protected]>

* fix(scheduler): keep Codex fallback on the original C1 runtime

Signed-off-by: LoopX Agent <[email protected]>

* fix(scheduler): pin the originating fallback launchers

Signed-off-by: LoopX Agent <[email protected]>

* Retire the duplicate Codex App scheduler projection

Signed-off-by: LoopX Agent <[email protected]>

* Seed the recorded scheduler profile in the elapsed-backoff fixture

Signed-off-by: LoopX Agent <[email protected]>

* Verify canonical cadence on refused and settled Turns

Signed-off-by: LoopX Agent <[email protected]>

* Pin named Core commands in saved scheduler fallbacks

Signed-off-by: LoopX Agent <[email protected]>

* fix(research): preserve saved case addresses when a version cannot open

Signed-off-by: LoopX Agent <[email protected]>

* Preserve citation focus after a saved study refresh

Signed-off-by: LoopX Agent <[email protected]>

* Capture authenticated LoopX receipts for Research attention (#8790)

* feat(research): capture authenticated LoopX attention receipts

Signed-off-by: lusendong.6789 <[email protected]>
Co-authored-by: TRAE CLI <[email protected]>

* fix(research): tighten attention receipt provenance

Signed-off-by: lusendong.6789 <[email protected]>
Co-authored-by: TRAE CLI <[email protected]>

* fix(research): publish attention captures after source validation

Signed-off-by: huangruiteng <[email protected]>

---------

Signed-off-by: lusendong.6789 <[email protected]>
Signed-off-by: huangruiteng <[email protected]>
Co-authored-by: TRAE CLI <[email protected]>
Co-authored-by: huangruiteng <[email protected]>

* Recover the original Session and Turn from a confirmed Chat task

Signed-off-by: huangruiteng <[email protected]>

* perf(lark,native_chat): eliminate redundant full-directory JSON reparsing in steward chat loops (#9041)

* perf(lark,native_chat): avoid full directory reparsing in steward chat loops

- Make LarkOwnerAttention._route iterate capture candidates lazily so matching stops at the newest valid p2p capture.
- Reuse FileChatDiscovery in PrivateIngressObserver._records while preserving strict field validation and fail-closed errors.
- Reuse FileChatDiscovery in ChatExternalConversations.pending so unchanged request journals skip redundant JSON reads and stay mutation-isolated.
- Add regression and scan-efficiency tests in tests/test_lark_steward_directory_scan_perf.py.

Signed-off-by: LoopX Agent <[email protected]>

* fix(native-chat): project small recovery metadata fields to stop data_url memory growth

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* Retire transitional smoke checks and duplicate execution (#9073)

Signed-off-by: lusendong.6789 <[email protected]>
Co-authored-by: TRAE CLI <[email protected]>

* feat(steward): support probe-gated generic continuous_monitor todos with handoff and user actions (#9074)

Signed-off-by: LoopX Agent <[email protected]>

* Remove redundant defensive prose from prompts and comments (#9072)

Remove redundant defensive prose while preserving published heartbeat wrappers and externally managed skill readiness.

Validated with 197 related tests, independent historical wrapper migrations and negative cases, installed-skill readback, and current-main quick canary. Existing CI qualification and infrastructure limitations remain recorded in PR #9072.

Signed-off-by: lusendong.6789 <[email protected]>
Signed-off-by: Lusen Dong <[email protected]>

* Keep original Chat retry errors visible during receipt refresh

Signed-off-by: LoopX Agent <[email protected]>

* fix(steward): tolerate report validator python drift and allow cancel of mid-turn failed reports (#9077)

Signed-off-by: LoopX Agent <[email protected]>

* feat(steward): add exact-head PR review signals and protected merge confirmation (#9081)

Signed-off-by: LoopX Agent <[email protected]>

* feat(steward): add isolated OpenViking long-term memory with per-speaker boundaries (#9083)

Signed-off-by: LoopX Agent <[email protected]>

* refactor(content-ops): slim surface module and eliminate Any (#8961)

* refactor(content-ops): slim surface module and eliminate Any

Signed-off-by: LoopX Agent <[email protected]>

* fix(content-ops): reject malformed angle source_item_ids containers

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* fix(collaboration): batch handoff query Goal lifetime guard lock per Goal (#9085)

Signed-off-by: LoopX Agent <[email protected]>

* fix(hosts): raise managed service startup readiness timeout to 45s (#9087)

Signed-off-by: LoopX Agent <[email protected]>

* perf(manager-context): memoize history_inspect lifecycle checks and scope runtime revision in handoffs query (#9088)

Eliminate the remaining O(N) Effect runtime RPCs and uncached runtime fingerprinting inside tracking.query(): enter effect_runtime_request_scope() for the query, memoize pure history_inspect lifecycle decisions across entries sharing identical Goal refs while holding the Goal lifetime guard, lazily discover legacy ingress files only when external audience recovery needs them, and preserve entry scan order across Goal batches.

Signed-off-by: LoopX Agent <[email protected]>

* refactor(lark): slim private_conversations below 2000 lines with net LOC reduction (#8929)

Signed-off-by: LoopX Agent <[email protected]>

* perf(chat,hosts): skip frontend source re-hashing on immutable installed releases and extend readiness timeout to 90s (#9089)

Signed-off-by: LoopX Agent <[email protected]>

* refactor(control-plane): split and slim quota monitor_poll_commit (#8885)

* refactor(control-plane): split and slim quota monitor_poll_commit

Signed-off-by: LoopX Agent <[email protected]>

* fix(control-plane): preserve legacy lane budget and observation diagnostic order

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* refactor(quota): slim loopx/quota.py and tighten Any count to zero (#8939)

Signed-off-by: LoopX Agent <[email protected]>

* refactor(native-chat): slim external_conversations below 2k lines and retire ceiling (#8911)

* refactor(native-chat): move steward commission mixin to steward_commands and retire external_conversations ceiling

Signed-off-by: LoopX Agent <[email protected]>

* fix(native-chat): respect include_raw_response in retained result recovery

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* refactor(chat): slim chat_runtime below 1,500 lines, fix entry-point project_contexts guard, and retire ceiling (#8920)

* refactor(chat): move session lifecycle mixin to session_open, deduplicate runtime helpers, and retire ceiling

Signed-off-by: LoopX Agent <[email protected]>

* fix(chat): drop turn_done_events slot before waking waiters on Thread.start failure

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* fix(steward): paginate open PR signal GraphQL, allow signal-unavailable monitor recovery, and cache private delivery scans (#9093)

Signed-off-by: LoopX Agent <[email protected]>

* perf(lark,native_chat): back off noop recovery retries and cache recovery lookups (#9096)

Signed-off-by: LoopX Agent <[email protected]>

* perf(native_chat,lark): cache unchanged quota backlog health and interrupt observations (#9098)

Signed-off-by: LoopX Agent <[email protected]>

* perf(lark,native_chat): coalesce listener snapshots and cache recovery event summaries (#9100)

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: cicolord <[email protected]>
Signed-off-by: LoopX Agent <[email protected]>
Signed-off-by: huangruiteng <[email protected]>
Signed-off-by: lusendong.6789 <[email protected]>
Signed-off-by: Lusen Dong <[email protected]>
Co-authored-by: cicolord <[email protected]>
Co-authored-by: huangruiteng <[email protected]>
Co-authored-by: Lusen Dong <[email protected]>
Co-authored-by: TRAE CLI <[email protected]>

* refactor(issue-fix): consolidate maintainer-correction admission and slim pr_lifecycle (#8897)

Signed-off-by: LoopX Agent <[email protected]>

* Fix truncated requests and responses in the Codex API relay (#8713)

* fix(codex relay): fence incomplete model requests before drain

Signed-off-by: LoopX Agent <[email protected]>

* fix(codex relay): surface incomplete upstream responses

Port the verified response framing fix to the request-admission branch. Original candidate 27bc3aee311cdfc6a00466ff9d3b58c7db36e01b.

Signed-off-by: LoopX Agent <[email protected]>

* Bound Codex relay writes to clients that stop reading

Signed-off-by: LoopX Agent <[email protected]>

* Reject upstream chunked responses missing the trailer terminator

Signed-off-by: LoopX Agent <[email protected]>

* Validate upstream chunk data delimiters before relay completion

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* fix(release): repair dsh closeout test, antigravity failover alias, and release download retry (#9147)

Signed-off-by: LoopX Agent <[email protected]>

* docs(release): update v2.4.0 release notes and dsh-loopx-plugin 0.1.1-beta.7 README (#9149)

Signed-off-by: LoopX Agent <[email protected]>

* fix(chat): recover saved answers and diagnose lost workers (#9120)

* fix(chat): recover saved answers and diagnose lost workers

Signed-off-by: LoopX Agent <[email protected]>

* style(lark): keep private_conversations within module line budget

Signed-off-by: LoopX Agent <[email protected]>

* fix(chat): retain execution_worker_exited in pending backlog count

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* fix(chat): resume steward requests lost before dispatch (#9125)

Signed-off-by: LoopX Agent <[email protected]>

* fix(benchmark): restore frozen v1 archives and align checkpoint/runtime tests with C1 defaults (#9151)

Signed-off-by: LoopX Agent <[email protected]>

* fix(release): stabilize CLI help, architecture guards, onboarding gate, and public smokes (#9152)

Signed-off-by: LoopX Agent <[email protected]>

* fix(steward): recover report selection across python upgrades and prevent queue kill on observation monitors (#9155)

Signed-off-by: LoopX Agent <[email protected]>

* fix(release): align extensions, chat, presentation, and transport tests for v2.4.0 (#9156)

Signed-off-by: LoopX Agent <[email protected]>

* fix(control-plane): stabilize v2.4.0 quota, turn-envelope, and capabilities slice (Slice B1) (#9154)

* fix(control-plane): stabilize v2.4.0 quota, turn-envelope, and capabilities slice

Signed-off-by: LoopX Agent <[email protected]>

* fix(quota): preserve tokenless identity and exact numeric types in attach_complete_turn_context

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* fix(steward): recover frozen report contract failures and rebind resumed task leases (#9157)

Signed-off-by: LoopX Agent <[email protected]>

* fix(steward): recover pre-dispatch runtime failures across endpoints and stop receipt-unknown disk churn (#9159)

Signed-off-by: LoopX Agent <[email protected]>

* fix(control_plane): align lease recovery, settlement readback, and runtime fixtures (#9158)

* fix(control_plane): align lease recovery, settlement readback, and runtime fixtures

Signed-off-by: LoopX Agent <[email protected]>

* fix(control_plane): forward record_capture in worker outage test and harden version type guard

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* fix(control-plane): stabilize v2.4.0 explore, context, and checkpoint tail slice (Slice B4) (#9161)

Signed-off-by: LoopX Agent <[email protected]>

* fix(control-plane): stabilize v2.4.0 replan, monitor recovery, and staged-read slice (Slice B5) (#9160)

Signed-off-by: LoopX Agent <[email protected]>

* docs(release): reconcile final v2.4.0 stabilization PRs and boundary wording (#9162)

* docs(release): reconcile final v2.4.0 stabilization PRs and boundary wording

Signed-off-by: LoopX Agent <[email protected]>

* docs(release): align #9158 and #9161 descriptions with verified commits

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>

* fix(steward): tolerate minor JSON delimiter glitches and recover saved report candidates (#9164)

Signed-off-by: LoopX Agent <[email protected]>

* fix(control-plane): preserve bound yardstick reversals in native replan openings (#9165)

Signed-off-by: LoopX Agent <[email protected]>

* fix(native-chat): recover loopback relay 401 failures and isolate test auth (#9167)

Signed-off-by: LoopX Agent <[email protected]>

---------

Signed-off-by: LoopX Agent <[email protected]>
Signed-off-by: cicolord <[email protected]>
Signed-off-by: huangruiteng <[email protected]>
Signed-off-by: lusendong.6789 <[email protected]>
Signed-off-by: Lusen Dong <[email protected]>
Co-authored-by: cicolord <[email protected]>
Co-authored-by: huangruiteng <[email protected]>
Co-authored-by: Lusen Dong <[email protected]>
Co-authored-by: TRAE CLI <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant